
/**
 * @brief    Defines External Response with User-Supplied Routines
 *
 * @version  0.1
 * @author   wuxingchuang
 * @date     2025.04.11
 *          _
 *      ___| |__   ___ _ __   __ _  ___  _ __   __ _
 *     / __| '_ \ / _ \ '_ \ / _` |/ _ \| '_ \ / _` |
 *     \__ \ | | |  __/ | | | (_| | (_) | | | | (_| |
 *     |___/_| |_|\___|_| |_|\__, |\___/|_| |_|\__, |
 *                           |___/             |___/
 * @copyright (c) 2024 by 神工仿真, All Rights Reserved.
 */
#pragma once
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Design/DesignBase.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN

struct SEDRSP3Data : public DesignBase {
  struct DESVARData {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of DVID
    SG::DataStructure::Common::Id m_DVID =
        0;  ///< DESVAR entry identification number
  };
  struct DNODEData {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of (GRID,COMP)
    SG::DataStructure::Common::Id m_GRID =
        0;  ///< Identification number of any grid point in the model
    SG::DataStructure::Common::I64 m_COMP =
        0;  ///< Component number of grid point GRID
  };
  struct DRESP1Data {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of R1ID
    SG::DataStructure::Common::Id m_R1ID =
        0;  ///< DRESP1 entry identification number
  };
  struct DRESP2Data {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of R2
    SG::DataStructure::Common::Id m_R2ID =
        0;  ///< DRESP2 entry identification number
  };
  struct DTABLEData {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of LABL
    char m_LABL[8] = {
        0};  ///< Label for a constant on the DTABLE or DTABLE2 entry
  };
  struct DVCREL1Data {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of DC1
    SG::DataStructure::Common::Id m_DC1ID =
        0;  ///< DVCREL1 entry identification number
  };
  struct DVCREL2Data {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of DC2
    SG::DataStructure::Common::Id m_DC2ID =
        0;  ///< DVCREL2 entry identification number
  };
  struct DVLREL1Data {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of R2
    SG::DataStructure::Common::Id m_L1ID =
        0;  ///< DVLREL1 entry identification number
  };
  struct DVMREL1Data {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of DM1
    SG::DataStructure::Common::Id m_DM1ID =
        0;  ///< DVMREL1 entry identification number
  };
  struct DVMREL2Data {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of DM2
    SG::DataStructure::Common::Id m_DM2ID =
        0;  ///< DVMREL2 entry identification number
  };
  struct DVPREL1Data {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of DP1
    SG::DataStructure::Common::Id m_DP1ID =
        0;  ///< DVPREL1 entry identification number
  };
  struct DVPREL2Data {
    SG::DataStructure::Common::Id m_SEID = 0;  ///< PART SE ID of DP2
    SG::DataStructure::Common::Id m_DP2ID =
        0;  ///< DVPREL2 entry identification number
  };
  struct GRDTYPSData {
    SG::DataStructure::Common::I64 m_GRDTYP = 0;  ///< Grid type
  };
  struct USERData {
    char m_USRDATA[8] = {0};  ///< User input data
  };

  char m_LABEL[8] = {0};  ///< User-defined label
  char m_GRPNM[8] = {0};  ///< Group name the external response type belongs to
  char m_TYPNM[8] = {0};  ///< External response type
  SG::DataStructure::Common::I64 m_REGION =
      0;  ///< Region identifier for constraint screening
  SG::DataStructure::Common::I64 m_NR3 = 0;      ///< number of responses
  SG::DataStructure::Common::Id m_domainId = 0;  ///<

  std::vector<DESVARData> m_DESVARList;
  std::vector<DNODEData> m_DNODEList;
  std::vector<DRESP1Data> m_DRESP1List;
  std::vector<DRESP2Data> m_DRESP2List;
  std::vector<DTABLEData> m_DTABLEList;
  std::vector<DVCREL1Data> m_DVCREL1List;
  std::vector<DVCREL2Data> m_DVCREL2List;
  std::vector<DVLREL1Data> m_DVLREL1List;
  std::vector<DVMREL1Data> m_DVMREL1List;
  std::vector<DVMREL2Data> m_DVMREL2List;
  std::vector<DVPREL1Data> m_DVPREL1List;
  std::vector<DVPREL2Data> m_DVPREL2List;
  std::vector<GRDTYPSData> m_GRDTYPSList;
  std::vector<USERData> m_USERList;
};

///@{ @brief operator override
DECLSPEC bool operator==(const SEDRSP3Data::DESVARData& val1,
                         const SEDRSP3Data::DESVARData& val2);
DECLSPEC bool operator==(const SEDRSP3Data::DNODEData& val1,
                         const SEDRSP3Data::DNODEData& val2);
DECLSPEC bool operator==(const SEDRSP3Data::DRESP1Data& val1,
                         const SEDRSP3Data::DRESP1Data& val2);
DECLSPEC bool operator==(const SEDRSP3Data::DRESP2Data& val1,
                         const SEDRSP3Data::DRESP2Data& val2);
DECLSPEC bool operator==(const SEDRSP3Data::DTABLEData& val1,
                         const SEDRSP3Data::DTABLEData& val2);
DECLSPEC bool operator==(const SEDRSP3Data::DVCREL1Data& val1,
                         const SEDRSP3Data::DVCREL1Data& val2);
DECLSPEC bool operator==(const SEDRSP3Data::DVCREL2Data& val1,
                         const SEDRSP3Data::DVCREL2Data& val2);
DECLSPEC bool operator==(const SEDRSP3Data::DVLREL1Data& val1,
                         const SEDRSP3Data::DVLREL1Data& val2);
DECLSPEC bool operator==(const SEDRSP3Data::DVMREL1Data& val1,
                         const SEDRSP3Data::DVMREL1Data& val2);
DECLSPEC bool operator==(const SEDRSP3Data::DVMREL2Data& val1,
                         const SEDRSP3Data::DVMREL2Data& val2);
DECLSPEC bool operator==(const SEDRSP3Data::DVPREL1Data& val1,
                         const SEDRSP3Data::DVPREL1Data& val2);
DECLSPEC bool operator==(const SEDRSP3Data::DVPREL2Data& val1,
                         const SEDRSP3Data::DVPREL2Data& val2);
DECLSPEC bool operator==(const SEDRSP3Data::GRDTYPSData& val1,
                         const SEDRSP3Data::GRDTYPSData& val2);
DECLSPEC bool operator==(const SEDRSP3Data::USERData& val1,
                         const SEDRSP3Data::USERData& val2);

DECLSPEC bool operator==(const SEDRSP3Data& val1, const SEDRSP3Data& val2);
///}@
SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE
